#ifndef LOGINVIEW_H
#define LOGINVIEW_H
#include <QFrame>

namespace Ui {
class LoginView;
}

class LoginView : public QFrame
{
    Q_OBJECT

public:
    explicit LoginView(QWidget* parent = nullptr);

    void setName(const QString& name);

signals:
    void registerRequested();
    void cancelRequested();
    void finished();

private:
    void updateUiStatus(bool busy);
    void updateButtonStatus();
    void login(const QString& name, const QString& pwd, const QString& code);

    Ui::LoginView* ui;
};

#endif // LOGINVIEW_H
